/*
 * @Author: 晟松
 * @Date: 2021-11-30 00:05:05
 * @LastEditors: 晟松
 * @LastEditTime: 2021-12-08 21:07:08
 * @FilePath: \mini-vue3d:\Code\node\koa2\volunteer-service\src\main\middleware.js
 * @Description: 
 */
import config from "./config";

export default (app) => {
  if (config.middlewares) {
    let middleware;
    config.middlewares.forEach((item) => {
      middleware = require(`./middleware/${item}`).default;
      app.use(middleware());
    });
  }
};
